package com.book.api;

import com.book.pojo.CollectRanking;
import com.book.pojo.MonthlyRanking;
import com.book.pojo.RewardRanking;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("ddbook-rankingList")
public interface RankingApi {

    @DeleteMapping("/collect-ranking/deleteBybid")
    public void deleteBybid(@RequestParam Long bid) ;

    @PostMapping("/collect-ranking/addCollectRanking")
    public void addCollectRanking(@RequestBody CollectRanking collectRanking) ;

    @DeleteMapping("/monthly-ranking/deleteByBookId")
    public void monthlydeleteBybid(@RequestParam Long bid);

    @PostMapping("/monthly-ranking/addMonthlyRanking")
    public void addMonthlyRanking(@RequestBody MonthlyRanking monthlyRanking);

    //删除一本书在评分榜里的评分
    @DeleteMapping("/score-ranking/deleteByBookId")
    public void deleteByBookId(Long bookId);

    //增加一本书的评分的平均分
    @PostMapping("/score-ranking/add")
    public void add(Long bookId,Double scoreAvg);

    @DeleteMapping("/reward-ranking/deleteByBookId")
    public void deleteRewardRankingByBookId(@RequestParam Long BookId);

    @PostMapping("/reward-ranking/addRewardRanking")
    public void addRewardRanking(@RequestParam RewardRanking ranking);
}
